import api from "./index";

// 地址数据请求接口
export default {
  //查询用户地址列表
  addressList: data => api.get("/lease/useraddr/list", data),
  // // 查询地址详情
  getAddressById: (id) => api.get(`/lease/useraddr/${id}`),
  // 新增用户地址
  saveAddress: data => api.post("/lease/useraddr",data),
  // 修改地址
  updateAddress: data=> api.put("/lease/useraddr", data),
   //删除地址
  deleteAddressIds: (ids) => api.delete(`/lease/useraddr/${ids}`),
  //获取地址列表
  getAddressList:(data)=> api.get('/lease/china/list',data),
  //更具id获取商品

  //获取用户信息
  getUserInfo: data => api.get("/getInfo", data),
  //查询商品分类列表
  // getGoodsClass: data => request("/lease/category/list", "get", data),
  getGoodsClass: data => api.get("/lease/category/list", data),
  //获取轮播图列表
  // getBannerList: data => request("/lease/banner/list", "get", data),
  getBannerList: data => api.get("/lease/banner/list", data),
  //获取商品信息
  // getList: data => request("/lease/good/list", "get", data),
  getList: data => api.get("/lease/good/list", data),
  //查询首页标签商品
  // getTatList: data => request("/lease/tags/getHomePageTag", "get", data),
  getTatList: data => api.get("/lease/tags/getHomePageTag", data),
  //获取商品详情
  // getIdClass: (id) => request(`/lease/good/${id}`, "get"),
  getIdClass: (id) => api.get(`/lease/good/${id}`),
  //获取标签商品
  // getTagArray: data => request('/lease/tags/list', "get", data),
  getTagArray: data => api.get('/lease/tags/list', data),
  //商品收藏
  // setCollection: data => request("/lease/collection", "post", data),
  setCollection: data => api.get("/lease/collection", data),
  //查看是否收藏
  // getCollectionId: (id) => request(`/lease/collection/${id}`, "get"),
  getCollectionId: (id) => api.get(`/lease/collection/${id}`),
  //删除收藏
  // deleteCollectin: (ids) => request(`/lease/collection/${ids}`, "DELETE"),
  deleteCollectin: (ids) => api.delete(`/lease/collection/${ids}`),
  //新增订单信息
  // setOrder: data => request("/lease/order", "post", data),
  setOrder: data => api.post("/lease/order", data),
  //查看订单信息
  // getOrderList: data => request("/lease/order/list", "get", data)
  getOrderList: data => api.get("/lease/order/list", data)
};
